package com.soup.bytebuddy;

import java.util.concurrent.Executors;
import java.util.concurrent.PriorityBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

/**
 * 〈一句话功能简述〉<br>
 *
 * @author zhaoyi
 */
public class PreMainV2Tester {

    public static void main(String[] args) throws InterruptedException {
        PreMainV2Tester apiTest = new PreMainV2Tester();
        apiTest.echoHi();
    }

    private void echoHi() throws InterruptedException {
        System.out.println("hi agent");

        ThreadPoolExecutor executor = new ThreadPoolExecutor(1, 1, 5000L,
                TimeUnit.MILLISECONDS, new PriorityBlockingQueue<>(),
                Executors.defaultThreadFactory(), new ThreadPoolExecutor.AbortPolicy());
        System.out.println(executor.getKeepAliveTime(TimeUnit.MILLISECONDS));

        Thread.sleep((long) (Math.random() * 500));
    }
}
